cmake_minimum_required(VERSION 2.8)
project( Features )

find_package( OpenCV REQUIRED )

add_library( features corners.cpp convexity.cpp complexity.cpp diffsegs.cpp endpoints.cpp ratio.cpp holes.cpp axismean.cpp )

add_executable( corners corners.cpp )
add_executable( convexity convexity.cpp )
add_executable( complexity complexity.cpp )
add_executable( projection projection.cpp )
add_executable( diffsegs diffsegs.cpp )
add_executable( endpoints endpoints.cpp )
add_executable( ratio ratio.cpp )
add_executable( skeleton skeleton.cpp )
add_executable( holes holes.cpp )
add_executable( axismean axismean.cpp )
add_executable( findborders findborders.cpp )

target_link_libraries( corners ${OpenCV_LIBS} )
target_link_libraries( convexity ${OpenCV_LIBS} )
target_link_libraries( complexity ${OpenCV_LIBS} )
target_link_libraries( projection ${OpenCV_LIBS} )
target_link_libraries( diffsegs ${OpenCV_LIBS} )
target_link_libraries( endpoints ${OpenCV_LIBS} )
target_link_libraries( ratio ${OpenCV_LIBS} )
target_link_libraries( skeleton ${OpenCV_LIBS} )
target_link_libraries( holes ${OpenCV_LIBS} )
target_link_libraries( axismean ${OpenCV_LIBS} )
target_link_libraries( findborders ${OpenCV_LIBS} )

set(CMAKE_CXX_FLAGS "-g -Wall -Wextra")
